import rxAjax from '@/assets/js/ajax.js';

//接口调用日志表 api接口
export const SysHttpTaskLogApi = {};

SysHttpTaskLogApi.baseUrl= '/api-system/system/core/sysHttpTaskLog';
SysHttpTaskLogApi.exportUrl= SysHttpTaskLogApi.baseUrl + '/listExport';

//查询列表
SysHttpTaskLogApi.query=function (parameter) {
    var url= SysHttpTaskLogApi.baseUrl + '/query';
    return rxAjax.postJson(url,parameter).then (res => {
        return res.result
    })
}

/**
 * 获取单记录
 * @param pkId
 * @returns {*}
 */
SysHttpTaskLogApi.get =function(pkId) {
    var url= SysHttpTaskLogApi.baseUrl + '/get?pkId=' + pkId;
    return rxAjax.get(url);
}

//保存数据
SysHttpTaskLogApi.save =function(parameter) {
    var url= SysHttpTaskLogApi.baseUrl + '/save';
    return rxAjax.postJson(url,parameter);
}

//删除数据
SysHttpTaskLogApi.del =function(parameter) {
    var url= SysHttpTaskLogApi.baseUrl + '/del';
    return rxAjax.postUrl(url,parameter);
}

//清空日志
SysHttpTaskLogApi.clearAll=function(){
    var url= SysHttpTaskLogApi.baseUrl + '/clearAll';
    return rxAjax.get(url);
}

export  default SysHttpTaskLogApi;

